use FALSE for size_only most of the time when calling
authorOwen Taylor <otaylor@redhat.com>
Fri, 14 Jul 2000 20:24:14 +0000 (20:24 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 14 Jul 2000 20:24:14 +0000 (20:24 +0000)
Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>

* gtk/gtktextlayout.c: use FALSE for size_only most
of the time when calling gtk_text_layout_get_line_display()
to avoid causing double reshapes when a redraw follows
immediately after.

Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>

* gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
appropriate region and gdk_window_process_updates() so trough
updating doesn't lag behind the window being scrolled.

        * gdk/gdkgc.c: Make parent_class pointer static.

Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
include <string.h>.

* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
cut-and-paste error in computing memory offset for 4 channels.

14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf.c
gdk/gdkgc.c
gdk/gdkpixbuf-render.c
gtk/gtkrange.c
gtk/gtktextlayout.c
gtk/gtktextview.c

index ed7b7efad003bc0f4c33bdbe25b08ea8eb7d0081..cd195b7283c147e9ecaeb4833cd2d4ed87c0c5f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c: use FALSE for size_only most
+       of the time when calling gtk_text_layout_get_line_display()
+       to avoid causing double reshapes when a redraw follows
+       immediately after.
+
+Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+       appropriate region and gdk_window_process_updates() so trough
+       updating doesn't lag behind the window being scrolled.
+
+        * gdk/gdkgc.c: Make parent_class pointer static.
+        
+Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+       include <string.h>.
+        
+       * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+       cut-and-paste error in computing memory offset for 4 channels.
+
 Fri Jul 14 14:05:02 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
index ed7b7efad003bc0f4c33bdbe25b08ea8eb7d0081..cd195b7283c147e9ecaeb4833cd2d4ed87c0c5f0 100644 (file)
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c: use FALSE for size_only most
+       of the time when calling gtk_text_layout_get_line_display()
+       to avoid causing double reshapes when a redraw follows
+       immediately after.
+
+Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+       appropriate region and gdk_window_process_updates() so trough
+       updating doesn't lag behind the window being scrolled.
+
+        * gdk/gdkgc.c: Make parent_class pointer static.
+        
+Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+       include <string.h>.
+        
+       * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+       cut-and-paste error in computing memory offset for 4 channels.
+
 Fri Jul 14 14:05:02 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
index ed7b7efad003bc0f4c33bdbe25b08ea8eb7d0081..cd195b7283c147e9ecaeb4833cd2d4ed87c0c5f0 100644 (file)
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c: use FALSE for size_only most
+       of the time when calling gtk_text_layout_get_line_display()
+       to avoid causing double reshapes when a redraw follows
+       immediately after.
+
+Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+       appropriate region and gdk_window_process_updates() so trough
+       updating doesn't lag behind the window being scrolled.
+
+        * gdk/gdkgc.c: Make parent_class pointer static.
+        
+Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+       include <string.h>.
+        
+       * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+       cut-and-paste error in computing memory offset for 4 channels.
+
 Fri Jul 14 14:05:02 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
index ed7b7efad003bc0f4c33bdbe25b08ea8eb7d0081..cd195b7283c147e9ecaeb4833cd2d4ed87c0c5f0 100644 (file)
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c: use FALSE for size_only most
+       of the time when calling gtk_text_layout_get_line_display()
+       to avoid causing double reshapes when a redraw follows
+       immediately after.
+
+Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+       appropriate region and gdk_window_process_updates() so trough
+       updating doesn't lag behind the window being scrolled.
+
+        * gdk/gdkgc.c: Make parent_class pointer static.
+        
+Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+       include <string.h>.
+        
+       * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+       cut-and-paste error in computing memory offset for 4 channels.
+
 Fri Jul 14 14:05:02 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
index ed7b7efad003bc0f4c33bdbe25b08ea8eb7d0081..cd195b7283c147e9ecaeb4833cd2d4ed87c0c5f0 100644 (file)
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c: use FALSE for size_only most
+       of the time when calling gtk_text_layout_get_line_display()
+       to avoid causing double reshapes when a redraw follows
+       immediately after.
+
+Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+       appropriate region and gdk_window_process_updates() so trough
+       updating doesn't lag behind the window being scrolled.
+
+        * gdk/gdkgc.c: Make parent_class pointer static.
+        
+Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+       include <string.h>.
+        
+       * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+       cut-and-paste error in computing memory offset for 4 channels.
+
 Fri Jul 14 14:05:02 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
index ed7b7efad003bc0f4c33bdbe25b08ea8eb7d0081..cd195b7283c147e9ecaeb4833cd2d4ed87c0c5f0 100644 (file)
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c: use FALSE for size_only most
+       of the time when calling gtk_text_layout_get_line_display()
+       to avoid causing double reshapes when a redraw follows
+       immediately after.
+
+Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+       appropriate region and gdk_window_process_updates() so trough
+       updating doesn't lag behind the window being scrolled.
+
+        * gdk/gdkgc.c: Make parent_class pointer static.
+        
+Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+       include <string.h>.
+        
+       * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+       cut-and-paste error in computing memory offset for 4 channels.
+
 Fri Jul 14 14:05:02 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
index ed7b7efad003bc0f4c33bdbe25b08ea8eb7d0081..cd195b7283c147e9ecaeb4833cd2d4ed87c0c5f0 100644 (file)
@@ -1,3 +1,26 @@
+Fri Jul 14 16:21:26 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtktextlayout.c: use FALSE for size_only most
+       of the time when calling gtk_text_layout_get_line_display()
+       to avoid causing double reshapes when a redraw follows
+       immediately after.
+
+Tue Jul 11 11:13:40 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gtk/gtkrange.c (gtk_range_default_[hv]slider_update): Invalidate
+       appropriate region and gdk_window_process_updates() so trough
+       updating doesn't lag behind the window being scrolled.
+
+        * gdk/gdkgc.c: Make parent_class pointer static.
+        
+Sun Jul  9 21:31:23 2000  Owen Taylor  <otaylor@redhat.com>
+
+        * gdk/gdk-pixbuf.c gtk/gdk-pixbuf-loader.c gtk/gtktextview.c:
+       include <string.h>.
+        
+       * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable): Fix
+       cut-and-paste error in computing memory offset for 4 channels.
+
 Fri Jul 14 14:05:02 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gtk/gtkrc.c (gtk_rc_parse_pixmap_path_string): Remove
index e0d202f5a37168840347d18b430a386451b40288..4bc6ed39c90da6892449a8062db03a2f3935010c 100644 (file)
@@ -1,3 +1,7 @@
+Tue Jul 11 11:26:42 2000  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk-pixbuf.c: Add <string.h> include.
+
 Tue Jul 11 06:20:14 2000  Tim Janik  <timj@gtk.org>
 
        * io-gif.c (gdk_pixbuf__gif_image_load_animation): 
index 50947ba8eade4eb45fde4a16bcb7d922574714ba..be3b2680326679f1f65678c397fc83dbdec5e8ef 100644 (file)
@@ -25,6 +25,7 @@
 #include <config.h>
 #include <math.h>
 #include <stdlib.h>
+#include <string.h>
 #include "gdk-pixbuf.h"
 #include "gdk-pixbuf-private.h"
 
index 07f80e94ab49d46f3af40d8c3013037a6ef7ac11..aea21dc7fc1c9d1dff73a13f631b0df00b9bea8d 100644 (file)
@@ -33,7 +33,7 @@
 static void gdk_gc_class_init (GObjectClass *class);
 static void gdk_gc_finalize   (GObject      *object);
 
-GObjectClass *parent_class;
+static GObjectClass *parent_class;
 
 GType
 gdk_gc_get_type (void)
index 39bda4cc12c6ebdb6edd54d43cd0c4a3368fd588..8831ba8a45c2e7e54b4536fffc2eac8774eea9ff 100644 (file)
@@ -191,7 +191,7 @@ gdk_pixbuf_render_to_drawable (GdkPixbuf   *pixbuf,
 
   if (pixbuf->n_channels == 4)
     {
-      buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 3;
+      buf = pixbuf->pixels + src_y * pixbuf->rowstride + src_x * 4;
       rowstride = pixbuf->rowstride;
 
       gdk_draw_rgb_32_image_dithalign (drawable, gc,
index bd3521634c6b88ceb4e23c7cb28f89a3addbdf96..c884e03fd7d3305f47acd70ad873f92248026834 100644 (file)
@@ -392,6 +392,36 @@ gtk_range_trough_click (GtkRange *range,
   return GTK_TROUGH_NONE;
 }
 
+static GdkRegion *
+get_window_region (GdkWindow *window)
+{
+  GdkRectangle rect;
+
+  gdk_window_get_position (window, &rect.x, &rect.y);
+  gdk_window_get_size (window, &rect.width, &rect.height);
+
+  return gdk_region_rectangle (&rect);
+}
+
+static void
+move_and_update_window (GdkWindow *window, gint x, gint y)
+{
+  GdkRegion *old_region;
+  GdkRegion *new_region;
+  GdkWindow *parent = gdk_window_get_parent (window);
+
+  old_region = get_window_region (window);
+  gdk_window_move (window, x, y);
+  new_region = get_window_region (window);
+                  
+  gdk_region_subtract (old_region, new_region);
+  gdk_window_invalidate_region (parent, old_region, TRUE);
+  gdk_region_destroy (old_region);
+  gdk_region_destroy (new_region);
+  
+  gdk_window_process_updates (parent, TRUE);
+}
+
 void
 gtk_range_default_hslider_update (GtkRange *range)
 {
@@ -427,7 +457,7 @@ gtk_range_default_hslider_update (GtkRange *range)
       else if (x > right)
        x = right;
 
-      gdk_window_move (range->slider, x, GTK_WIDGET (range)->style->ythickness);
+      move_and_update_window (range->slider, x, GTK_WIDGET (range)->style->ythickness);
     }
 }
 
@@ -466,7 +496,7 @@ gtk_range_default_vslider_update (GtkRange *range)
       else if (y > bottom)
        y = bottom;
 
-      gdk_window_move (range->slider, GTK_WIDGET (range)->style->xthickness, y);
+      move_and_update_window (range->slider, GTK_WIDGET (range)->style->xthickness, y);
     }
 }
 
index b4dd559fb1d04bbcaee4fac978dbbeb8f74d234e..03f419c37b1a6a588b4ae6353ba1cf66ab8bcbb9 100644 (file)
@@ -1459,7 +1459,7 @@ gtk_text_layout_get_iter_at_pixel (GtkTextLayout *layout,
 
   get_line_at_y (layout, y, &line, &line_top);
 
-  display = gtk_text_layout_get_line_display (layout, line, TRUE);
+  display = gtk_text_layout_get_line_display (layout, line, FALSE);
 
   x -= display->x_offset;
   y -= line_top + display->top_margin;
@@ -1521,7 +1521,7 @@ gtk_text_layout_get_cursor_locations (GtkTextLayout  *layout,
   line = gtk_text_iter_get_line (iter);
   line_top = gtk_text_btree_find_line_top (layout->buffer->tree, line, layout);
 
-  display = gtk_text_layout_get_line_display (layout, line, TRUE);
+  display = gtk_text_layout_get_line_display (layout, line, FALSE);
 
   pango_layout_get_cursor_pos (display->layout, gtk_text_iter_get_line_byte (iter),
                               strong_pos ? &pango_strong_pos : NULL,
@@ -1587,7 +1587,7 @@ gtk_text_layout_get_iter_location (GtkTextLayout     *layout,
   tree = gtk_text_iter_get_btree (iter);
   line = gtk_text_iter_get_line (iter);
 
-  display = gtk_text_layout_get_line_display (layout, line, TRUE);
+  display = gtk_text_layout_get_line_display (layout, line, FALSE);
 
   rect->y = gtk_text_btree_find_line_top (tree, line, layout);
 
@@ -1645,7 +1645,7 @@ find_display_line_below (GtkTextLayout *layout,
 
   while (line && !found_line)
     {
-      GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, TRUE);
+      GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, FALSE);
       gint byte_index = 0;
       GSList *tmp_list =  pango_layout_get_lines (display->layout);
 
@@ -1707,7 +1707,7 @@ find_display_line_above (GtkTextLayout *layout,
 
   while (line && !found_line)
     {
-      GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, TRUE);
+      GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, FALSE);
       PangoRectangle logical_rect;
       
       gint byte_index = 0;
@@ -1822,7 +1822,7 @@ gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout,
   line = gtk_text_iter_get_line (iter);
   line_byte = gtk_text_iter_get_line_byte (iter);
   
-  display = gtk_text_layout_get_line_display (layout, line, TRUE);
+  display = gtk_text_layout_get_line_display (layout, line, FALSE);
 
   tmp_list = pango_layout_get_lines (display->layout);
   layout_line = tmp_list->data;
@@ -1836,7 +1836,7 @@ gtk_text_layout_move_iter_to_previous_line (GtkTextLayout *layout,
          gint byte_offset = 0;
          
          gtk_text_layout_free_line_display (layout, display);
-         display = gtk_text_layout_get_line_display (layout, prev_line, TRUE);
+         display = gtk_text_layout_get_line_display (layout, prev_line, FALSE);
          
          tmp_list =  pango_layout_get_lines (display->layout);
 
@@ -1913,7 +1913,7 @@ gtk_text_layout_move_iter_to_next_line (GtkTextLayout *layout,
       gint byte_offset = 0;
       GSList *tmp_list;
       
-      display = gtk_text_layout_get_line_display (layout, line, TRUE);
+      display = gtk_text_layout_get_line_display (layout, line, FALSE);
 
       tmp_list = pango_layout_get_lines (display->layout);
       while (tmp_list && !found_after)
@@ -1968,7 +1968,7 @@ gtk_text_layout_move_iter_to_x (GtkTextLayout *layout,
   line = gtk_text_iter_get_line (iter);
   line_byte = gtk_text_iter_get_line_byte (iter);
   
-  display = gtk_text_layout_get_line_display (layout, line, TRUE);
+  display = gtk_text_layout_get_line_display (layout, line, FALSE);
 
   tmp_list = pango_layout_get_lines (display->layout);
   while (tmp_list)
@@ -2052,7 +2052,7 @@ gtk_text_layout_move_iter_visually (GtkTextLayout *layout,
     {
       GtkTextLine *line = gtk_text_iter_get_line (iter);
       gint line_byte = gtk_text_iter_get_line_byte (iter);
-      GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, TRUE);
+      GtkTextLineDisplay *display = gtk_text_layout_get_line_display (layout, line, FALSE);
       int byte_count = gtk_text_line_byte_count (line);
       
       int new_index;
index d9826d36c5ec602c8cc9c1892e03e8c761ad5b75..ccdec0eb2089f5b9c973473dfba7bd500eed0620 100644 (file)
@@ -48,6 +48,8 @@
  * 
  */
 
+#include <string.h>
+
 #include "gtkbindings.h"
 #include "gtkdnd.h"
 #include "gtkmain.h"